% ------------------------------------------------------------------------
% File: correct.sty
%       ===========
%
% A (very) simple Revision Control System for LaTeX2e/WinEdt
%
% Version 0.001 2000/12/05 by Aleksander Simonic
%         0.002 2001/03/04 changed by R Schlicht
%
% This package comes with no guarantees and no reserved rights.
% You can use or modify this file at your own risk.
%
% ************************************************************************
%
% Examples of Usage:
% ==================
%
%\usepackage[active,new,old]{correct} % \Add and \Del Corrections
%\usepackage[active]{correct} % Only Additions- in blue colors
%\usepackagep[active,old,nonew]{correct} % Old text - in red
%\usepackage{correct} % Only Additions - no colors: final version
%
% In your preamble you have to also include the color package:
%
% \usepackage{color}
%
% In WinEdt mark your deletions and additions as:
%
% ... \Del{Old Text} \Add{New text}
%
% ------------------------------------------------------------------------
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{correct}[2000/12/05 v0.001 Corrections]
\RequirePackage{color}
\RequirePackage{ulem}
\newif\ifAddDel \AddDeltrue
\newif\ifAddNew \AddNewtrue
\newif\ifAddOld \AddOldfalse
\DeclareOption{active}{\AddDeltrue}
\DeclareOption{inactive}{\AddDelfalse}
\DeclareOption{new}{\AddNewtrue}
\DeclareOption{nonew}{\AddNewfalse}
\DeclareOption{old}{\AddOldtrue}
\DeclareOption{noold}{\AddOldfalse}
\ExecuteOptions{inactive,noold,new}
\ProcessOptions

%\def\strikethrough#1{%
%{%
%\setbox0=\hbox{#1}% 
%\dimen0=\ht0 \dimen1=\dp0 \setbox1=\vbox{
%\box0 \vskip-\dimen1\vskip-0.8ex \hrule }% 
%\ht1=\dimen0 \dp1=\dimen1 \box1 }% 
%}

%\def\strikethrough#1{{%
%\setbox0=\hbox{#1}% 
%\dimen0 0.8ex\dimen1\dimen0\advance\dimen1 by0.4pt 
%\rlap{\leaders\hrule height \dimen1 depth -\dimen0\hskip\wd0}% 
%\box0 }} 

% ------------------------------------------------------------------------
% [changed the definitions so that colouring can span over a paragraph break
%  (schlicht 2001/03/04)]
%\DeclareRobustCommand\Del[1]{\ifAddOld\ifAddDel{{\color{red}#1}}\else#1\fi\fi}
%\DeclareRobustCommand\Add[1]{\ifAddNew\ifAddDel{{\color{blue}#1}}\else#1\fi\fi}
% Alternative without colors
%\DeclareRobustCommand\Del[1]{\ifAddOld\ifAddDel{{\sffamily#1}}\else#1\fi\fi}
%\DeclareRobustCommand\Add[1]{\ifAddNew\ifAddDel{{\bfseries#1}}\else#1\fi\fi}
% Alternative with underline and cross through (mulvany 08/10/2004)
\DeclareRobustCommand\Del[1]{\ifAddOld\ifAddDel{{\color{red}\sout{#1}}}\else#1\fi\fi}
\DeclareRobustCommand\Add[1]{\ifAddNew\ifAddDel{{\color{blue}\underline{#1}}}\else#1\fi\fi}
%------------------------------------------------------------------------
